package com.lj.map.property;

import com.MapUtil;
import com.lj.map.property.base.HashMapKeyEqualehash;

import java.util.HashMap;

/**
 * defaultInitialCapacity：默认容量
 * table.length:当前实际容量
 * size：实际数据数量
 * threshold：阈值 ＝ 当前容量 ＊ loadFactor
 * loadFactor:加载因子
 * Created by yangsp1 on 16/3/31.
 */
public class LinkedNodeTreeNode {
    public static void main(String args[]) throws Exception {
        //指定容量(2的指数，否则容量取 (n-1)*2)
        HashMap map = new HashMap(4,0.5F);
        HashMapKeyEqualehash h1 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h2 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h3 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h4 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h5 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h6 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h7 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h8 = new HashMapKeyEqualehash();
        HashMapKeyEqualehash h9 = new HashMapKeyEqualehash();

        map.put(h1,"");
        map.put(h2,"");
        map.put(h3,"");
        map.put(h4,"");
        map.put(h5,"");
        map.put(h6,"");
        map.put(h7,"");
        //debug - 641-643 : TREEIFY_THRESHOLD=8
        map.put(h8,"");
        //当链表超过8时，转化为树存储
        //debug - 641-643: UNTREEIFY_THRESHOLD=6
        map.put(h9,"");


    }
}
